home *** CD-ROM | disk | FTP | other *** search
- {++
-
- m a p i s p i . p a s
-
- Abstract:
-
- Automatic conversion of mapispi.h.
-
- Comments:
-
- This source file automatically converted by
- htrans 0.91 beta 1 Copyright (c) 1997 Alexander Staubo
-
- Revision history:
-
- 18-06-1997 20:53 alex [Autogenerated]
- 18-06-1997 20:53 alex Retouched for release
-
- --}
-
- unit MapiSpi;
-
- interface
-
- uses
- Windows, SysUtils, ActiveX,
- mapidefs, mapix, mapiguid, mapicode;
-
-
- (*
- * M A P I S P I . H
- *
- * Defines the calls and structures exchanged between MAPI or the spooler
- * and the MAPI service providers
- *
- * Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
- *)
-
-
- (* The MAPI SPI has a version number. MAPIX.DLL knows and supports
- * one or more versions of the SPI. Each provider supports one or
- * more versions of the SPI. Checks are performed in both MAPIX.DLL
- * and in the provider to ensure that they agree to use exactly one
- * version of the MAPI SPI.
- *
- * The SPI version number is composed of a major (8-bit) version,
- * minor (8-bit) version, and micro (16-bit) version. The first
- * retail ship of MAPI 1.0 is expected to be version 1.0.0.
- * The major version number changes rarely.
- * The minor version number changes opon each retail ship of
- * MAPI if the SPI has been modified.
- * The micro version number changes internally at Microsoft
- * during development of MAPI.
- *
- * The version of the SPI documented by this set of header files
- * is ALWAYS known as "CURRENT_SPI_VERSION". If you write a
- * service provider, and get a new set of header files, and update
- * your code to the new interface, you'll be at the "current" version.
- *)
-
- const CURRENT_SPI_VERSION = $00010010;
-
- (* Here are some well-known SPI version numbers:
- * (These will eventually be useful for provider-writers who
- * might choose to make provider DLLs that support more than
- * one version of the MAPI SPI.
- *)
-
- const PDK1_SPI_VERSION = $00010000 { 0.1.0 MAPI PDK1 Spring 1993 };
-
- const PDK2_SPI_VERSION = $00010008 { 0.1.8 MAPI PDK2 Spring 1994 };
-
- const PDK3_SPI_VERSION = $00010010 { 0.1.16 MAPI PDK3 Fall 1994 };
-
- (*
- * Forward declaration of interface pointers specific to the service
- * provider interface.
- *)
-
-
- { IMAPISupport Interface -------------------------------------------------- }
-
- { Notification key structure for the MAPI notification engine }
-
- type
- TNOTIFKEY =
- record
- cb : ULONG; { How big the key is }
- ab : array[0..MAPI_DIM - 1]
- of Byte; { Key contents }
- end;
-
- PNOTIFKEY = ^TNOTIFKEY;
-
- { For Subscribe() }
-
- const NOTIFY_SYNC = ULONG( $40000000);
-
- { For Notify() }
-
- const NOTIFY_CANCELED = ULONG( $80000000);
-
- { From the Notification Callback function (well, this is really a ulResult) }
-
- const CALLBACK_DISCONTINUE = ULONG( $80000000);
-
- { For Transport's SpoolerNotify() }
-
- const NOTIFY_NEWMAIL = ULONG( $00000001);
- const NOTIFY_READYTOSEND = ULONG( $00000002);
- const NOTIFY_SENTDEFERRED = ULONG( $00000004);
- const NOTIFY_CRITSEC = ULONG( $00001000);
- const NOTIFY_NONCRIT = ULONG( $00002000);
- const NOTIFY_CONFIG_CHANGE = ULONG( $00004000);
- const NOTIFY_CRITICAL_ERROR = ULONG( $10000000);
-
- { For Message Store's SpoolerNotify() }
-
- const NOTIFY_NEWMAIL_RECEIVED = ULONG( $20000000);
-
- { For ModifyStatusRow() }
-
- const STATUSROW_UPDATE = ULONG( $10000000);
-
- { For IStorageFromStream() }
-
- const STGSTRM_RESET = ULONG( $00000000);
- const STGSTRM_CURRENT = ULONG( $10000000);
- const STGSTRM_MODIFY = ULONG( $00000002);
- const STGSTRM_CREATE = ULONG( $00001000);
-
- { For GetOneOffTable() }
- {***** MAPI_UNICODE ((ULONG) 0x80000000) }
-
- { For CreateOneOff() }
- {***** MAPI_UNICODE ((ULONG) 0x80000000) }
- {***** MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000) }
-
- { For ReadReceipt() }
- const MAPI_NON_READ = ULONG( $00000001);
-
- { For DoConfigPropSheet() }
- {***** MAPI_UNICODE ((ULONG) 0x80000000) }
-
- { Preprocessor calls: }
-
- { PreprocessMessage, first ordinal in RegisterPreprocessor(). }
-
- type
- TPREPROCESSMESSAGE = function (lpvSession : Pointer; lpMessage : IMessage;
- lpAdrBook : IAddrBook; lpFolder : IMAPIFolder;
- AllocateBuffer : PALLOCATEBUFFER; AllocateMore : PALLOCATEMORE;
- FreeBuffer : PFREEBUFFER; var lpcOutbound : ULONG;
- var lpppMessage : IMessage;
- var lppRecipList : PADRLIST) : HResult; stdcall;
-
- { RemovePreprocessInfo, second ordinal in RegisterPreprocessor(). }
-
- type
- TREMOVEPREPROCESSINFO = function (lpMessage : IMessage) : HResult; stdcall;
-
- { Function pointer for GetReleaseInfo }
-
- type
- IMAPISupport =
- interface(IUnknown)
- [strIID_IMAPISup]
- function GetLastError (hResult : HResult; ulFlags : ULONG;
- var lppMAPIError : PMAPIERROR) : HResult; stdcall;
- function GetMemAllocRoutines (var lpAllocateBuffer : PALLOCATEBUFFER;
- var lpAllocateMore : PALLOCATEMORE;
- var lpFreeBuffer : PFREEBUFFER) : HResult; stdcall;
- function Subscribe (lpKey : PNOTIFKEY; ulEventMask : ULONG;
- ulFlags : ULONG; lpAdviseSink : IMAPIAdviseSink;
- var lpulConnection : ULONG) : HResult; stdcall;
- function Unsubscribe (ulConnection : ULONG) : HResult; stdcall;
- function Notify (lpKey : PNOTIFKEY; cNotification : ULONG;
- lpNotifications : PNOTIFICATION;
- var lpulFlags : ULONG) : HResult; stdcall;
- function ModifyStatusRow (cValues : ULONG; lpColumnVals : PSPropValue;
- ulFlags : ULONG) : HResult; stdcall;
- function OpenProfileSection (lpUid : PMAPIUID; ulFlags : ULONG;
- var lppProfileObj : IProfSect) : HResult; stdcall;
- function RegisterPreprocessor (lpMuid : PMAPIUID; lpszAdrType : PChar;
- lpszDLLName : PChar; lpszPreprocess : { String8! }LPSTR;
- lpszRemovePreprocessInfo : { String8! }LPSTR;
- ulFlags : ULONG) : HResult; stdcall;
- function NewUID (lpMuid : PMAPIUID) : HResult; stdcall;
- function MakeInvalid (ulFlags : ULONG; lpObject : Pointer;
- ulRefCount : ULONG; cMethods : ULONG) : HResult; stdcall;
- function SpoolerYield (ulFlags : ULONG) : HResult; stdcall;
- function SpoolerNotify (ulFlags : ULONG;
- lpvData : Pointer) : HResult; stdcall;
- function CreateOneOff (lpszName : PChar; lpszAdrType : PChar;
- lpszAddress : PChar; ulFlags : ULONG; var lpcbEntryID : ULONG;
- var lppEntryID : PENTRYID) : HResult; stdcall;
- function SetProviderUID (lpProviderID : PMAPIUID;
- ulFlags : ULONG) : HResult; stdcall;
- function CompareEntryIDs (cbEntry1 : ULONG; lpEntry1 : PENTRYID;
- cbEntry2 : ULONG; lpEntry2 : PENTRYID; ulCompareFlags : ULONG;
- var lpulResult : ULONG) : HResult; stdcall;
- function OpenTemplateID (cbTemplateID : ULONG; lpTemplateID : PENTRYID;
- ulTemplateFlags : ULONG; lpMAPIPropData : IMAPIProp;
- lpInterface : PIID; var lppMAPIPropNew : IMAPIProp;
- lpMAPIPropSibling : IMAPIProp) : HResult; stdcall;
- function OpenEntry (cbEntryID : ULONG; lpEntryID : PENTRYID;
- lpInterface : PIID; ulOpenFlags : ULONG; var lpulObjType : ULONG;
- var lppUnk : IUnknown) : HResult; stdcall;
- function GetOneOffTable (ulFlags : ULONG;
- var lppTable : IMAPITable) : HResult; stdcall;
- function Address (var lpulUIParam : ULONG; lpAdrParms : PADRPARM;
- var lppAdrList : PADRLIST) : HResult; stdcall;
- function Details (var lpulUIParam : ULONG; lpfnDismiss : PFNDISMISS;
- lpvDismissContext : Pointer; cbEntryID : ULONG; lpEntryID : PENTRYID;
- lpfButtonCallback : PFNBUTTON; lpvButtonContext : Pointer;
- lpszButtonText : PChar; ulFlags : ULONG) : HResult; stdcall;
- function NewEntry (ulUIParam : ULONG; ulFlags : ULONG;
- cbEIDContainer : ULONG; lpEIDContainer : PENTRYID;
- cbEIDNewEntryTpl : ULONG; lpEIDNewEntryTpl : PENTRYID;
- var lpcbEIDNewEntry : ULONG;
- var lppEIDNewEntry : PENTRYID) : HResult; stdcall;
- function DoConfigPropsheet (ulUIParam : ULONG; ulFlags : ULONG;
- lpszTitle : PChar; lpDisplayTable : IMAPITable;
- lpCOnfigData : IMAPIProp; ulTopPage : ULONG) : HResult; stdcall;
- function CopyMessages (lpSrcInterface : PIID; lpSrcFolder : Pointer;
- lpMsgList : PENTRYLIST; lpDestInterface : PIID; lpDestFolder : Pointer;
- ulUIParam : ULONG; lpProgress : IMAPIProgress;
- ulFlags : ULONG) : HResult; stdcall;
- function CopyFolder (lpSrcInterface : PIID; lpSrcFolder : Pointer;
- cbEntryID : ULONG; lpEntryID : PENTRYID; lpDestInterface : PIID;
- lpDestFolder : Pointer; lszNewFolderName : PChar; ulUIParam : ULONG;
- lpProgress : IMAPIProgress; ulFlags : ULONG) : HResult; stdcall;
- function DoCopyTo (lpSrcInterface : PIID; lpSrcObj : Pointer;
- ciidExclude : ULONG; rgiidExclude : PIID;
- lpExcludeProps : PSPropTagArray; ulUIParam : ULONG;
- lpProgress : IMAPIProgress; lpDestInterface : PIID;
- lpDestObj : Pointer; ulFlags : ULONG;
- var lppProblems : PSPropProblemArray) : HResult; stdcall;
- function DoCopyProps (lpSrcInterface : PIID; lpSrcObj : Pointer;
- lpIncludeProps : PSPropTagArray; ulUIParam : ULONG;
- lpProgress : IMAPIProgress; lpDestInterface : PIID;
- lpDestObj : Pointer; ulFlags : ULONG;
- var lppProblems : PSPropProblemArray) : HResult; stdcall;
- function DoProgressDialog (ulUIParam : ULONG; ulFlags : ULONG;
- var lppProgress : IMAPIProgress) : HResult; stdcall;
- function ReadReceipt (ulFlags : ULONG; lpReadMessage : IMessage;
- var lppEmptyMessage : IMessage) : HResult; stdcall;
- function PrepareSubmit (lpMessage : IMessage;
- var lpulFlags : ULONG) : HResult; stdcall;
- function ExpandRecips (lpMessage : IMessage;
- var lpulFlags : ULONG) : HResult; stdcall;
- function UpdatePAB (ulFlags : ULONG;
- lpMessage : IMessage) : HResult; stdcall;
- function DoSentMail (ulFlags : ULONG;
- lpMessage : IMessage) : HResult; stdcall;
- function OpenAddressBook (lpInterface : PIID; ulFlags : ULONG;
- var lppAdrBook : IAddrBook) : HResult; stdcall;
- function Preprocess (ulFlags : ULONG; cbEntryID : ULONG;
- lpEntryID : PENTRYID) : HResult; stdcall;
- function CompleteMsg (ulFlags : ULONG; cbEntryID : ULONG;
- lpEntryID : PENTRYID) : HResult; stdcall;
- function StoreLogoffTransports (var lpulFlags :
- ULONG) : HResult; stdcall;
- function StatusRecips (lpMessage : IMessage;
- lpRecipList : PADRLIST) : HResult; stdcall;
- function WrapStoreEntryID (cbOrigEntry : ULONG; lpOrigEntry : PENTRYID;
- var lpcbWrappedEntry : ULONG;
- var lppWrappedEntry : PENTRYID) : HResult; stdcall;
- function ModifyProfile (ulFlags : ULONG) : HResult; stdcall;
- function IStorageFromStream (lpUnkIn : IUnknown; lpInterface : PIID;
- ulFlags : ULONG; var lppStorageOut : IStorage) : HResult; stdcall;
- function GetSvcConfigSupportObj (ulFlags : ULONG;
- var lppSvcSupport : IMAPISupport) : HResult; stdcall;
- end;
-
- {******************************************************************}
- { }
- { ADDRESS BOOK SPI }
- { }
- {******************************************************************}
-
- { Address Book Provider ------------------------------------------------- }
-
- { OpenTemplateID() }
- const FILL_ENTRY = ULONG( $00000001);
-
- { For Logon() }
-
- {#define AB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h }
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
-
- type
- IABLogon = interface;
-
- IABProvider =
- interface(IUnknown)
- [strIID_IABProvider]
- function Shutdown (var lpulFlags : ULONG) : HResult; stdcall;
- function Logon (lpMAPISup : IMAPISupport; ulUIParam : ULONG;
- lpszProfileName : PChar; ulFlags : ULONG; var lpulpcbSecurity : ULONG;
- var lppbSecurity : PBYTE; var lppMAPIError : PMAPIERROR;
- var lppABLogon : IABLogon) : HResult; stdcall;
- end;
-
- { For GetOneOffTable() }
- {***** MAPI_UNICODE ((ULONG) 0x80000000) }
-
- IABLogon =
- interface(IUnknown)
- [strIID_IABLogon]
- function GetLastError (hResult : HResult; ulFlags : ULONG;
- var lppMAPIError : PMAPIERROR) : HResult; stdcall;
- function Logoff (ulFlags : ULONG) : HResult; stdcall;
- function OpenEntry (cbEntryID : ULONG; lpEntryID : PENTRYID;
- lpInterface : PIID; ulFlags : ULONG; var lpulObjType : ULONG;
- var lppUnk : IUnknown) : HResult; stdcall;
- function CompareEntryIDs (cbEntryID1 : ULONG; lpEntryID1 : PENTRYID;
- cbEntryID2 : ULONG; lpEntryID2 : PENTRYID; ulFlags : ULONG;
- var lpulResult : ULONG) : HResult; stdcall;
- function Advise (cbEntryID : ULONG; lpEntryID : PENTRYID;
- ulEventMask : ULONG; lpAdviseSink : IMAPIAdviseSink;
- var lpulConnection : ULONG) : HResult; stdcall;
- function Unadvise (ulConnection : ULONG) : HResult; stdcall;
- function OpenStatusEntry (lpInterface : PIID; ulFlags : ULONG;
- var lpulObjType : ULONG; var lppEntry : IMAPIStatus) : HResult; stdcall;
- function OpenTemplateID (cbTemplateID : ULONG; lpTemplateID : PENTRYID;
- ulTemplateFlags : ULONG; lpMAPIPropData : IMAPIProp;
- lpInterface : PIID; var lppMAPIPropNew : IMAPIProp;
- lpMAPIPropSibling : IMAPIProp) : HResult; stdcall;
- function GetOneOffTable (ulFlags : ULONG;
- var lppTable : IMAPITable) : HResult; stdcall;
- function PrepareRecips (ulFlags : ULONG; lpPropTagArray : PSPropTagArray;
- lpRecipList : PADRLIST) : HResult; stdcall;
- end;
-
- {!! Note: Address book providers export a function called "ABProviderInit"
- following the syntax of this function declaration }
-
- TABPROVIDERINIT = function (hInstance : HINST; lpMalloc : IMalloc;
- lpAllocateBuffer : PALLOCATEBUFFER; lpAllocateMore : PALLOCATEMORE;
- lpFreeBuffer : PFREEBUFFER; ulFlags : ULONG; ulMAPIVer : ULONG;
- var lpulProviderVer : ULONG;
- var lppABProvider : IABProvider) : HResult; cdecl;
-
- {******************************************************************}
- { }
- { TRANSPORT SPI }
- { }
- {******************************************************************}
-
- { For DeinitTransport }
-
- const DEINIT_NORMAL = ULONG( $00000001);
- const DEINIT_HURRY = ULONG( $80000000);
-
- { For TransportLogon }
-
- { Flags that the Spooler may pass to the transport: }
-
- const LOGON_NO_DIALOG = ULONG( $00000001);
- const LOGON_NO_CONNECT = ULONG( $00000004);
- const LOGON_NO_INBOUND = ULONG( $00000008);
- const LOGON_NO_OUTBOUND = ULONG( $00000010);
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
-
- { Flags that the transport may pass to the Spooler: }
-
- const LOGON_SP_IDLE = ULONG( $00010000);
- const LOGON_SP_POLL = ULONG( $00020000);
- const LOGON_SP_RESOLVE = ULONG( $00040000);
-
- { OptionData returned from call to RegisterOptions }
-
- const OPTION_TYPE_RECIPIENT = ULONG( $00000001);
- const OPTION_TYPE_MESSAGE = ULONG( $00000002);
-
- type
- TOPTIONDATA =
- record
- ulFlags : ULONG; { MAPI_RECIPIENT, MAPI_MESSAGE }
- lpRecipGUID : PGUID; { Same as returned by AddressTypes() }
- lpszAdrType : PChar; { Same as returned by AddressTypes() }
- lpszDLLName : PChar; { Options DLL }
- ulOrdinal : ULONG; { Ordinal in that DLL }
- cbOptionsData : ULONG; { Count of bytes in lpbOptionsData }
- lpbOptionsData : PBYTE; { Providers per [recip|message] option data }
- cOptionsProps : ULONG; { Count of Options default prop values }
- lpOptionsProps : PSPropValue; { Default Options property values }
- end;
-
- POPTIONDATA = ^TOPTIONDATA;
-
- TOPTIONCALLBACK = function (hInst : HINST; lpMalloc : IMalloc;
- ulFlags : ULONG; cbOptionData : ULONG; lpbOptionData : PBYTE;
- lpMAPISup : IMAPISupport; lpDataSource : IMAPIProp;
- var lppWrappedSource : IMAPIProp;
- var lppMAPIError : PMAPIERROR) : SCODE; cdecl;
-
- { For XP_AddressTypes }
-
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
-
- { For XP_RegisterRecipOptions }
-
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
-
- { For XP_RegisterMessageOptions }
-
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
-
- { For TransportNotify }
-
- const NOTIFY_ABORT_DEFERRED = ULONG( $40000000);
- const NOTIFY_CANCEL_MESSAGE = ULONG( $80000000);
- const NOTIFY_BEGIN_INBOUND = ULONG( $00000001);
- const NOTIFY_END_INBOUND = ULONG( $00010000);
- const NOTIFY_BEGIN_OUTBOUND = ULONG( $00000002);
- const NOTIFY_END_OUTBOUND = ULONG( $00020000);
- const NOTIFY_BEGIN_INBOUND_FLUSH = ULONG( $00000004);
- const NOTIFY_END_INBOUND_FLUSH = ULONG( $00040000);
- const NOTIFY_BEGIN_OUTBOUND_FLUSH = ULONG( $00000008);
- const NOTIFY_END_OUTBOUND_FLUSH = ULONG( $00080000);
-
- { For TransportLogoff }
-
- const LOGOFF_NORMAL = ULONG( $00000001);
- const LOGOFF_HURRY = ULONG( $80000000);
-
- { For SubmitMessage }
-
- const BEGIN_DEFERRED = ULONG( $00000001);
-
- { For EndMessage }
-
- { Flags that the Spooler may pass to the Transport: }
-
- { Flags that the transport may pass to the Spooler: }
-
- const END_RESEND_NOW = ULONG( $00010000);
- const END_RESEND_LATER = ULONG( $00020000);
- const END_DONT_RESEND = ULONG( $00040000);
-
- type
- IXPLogon = interface;
-
- IXPProvider =
- interface(IUnknown)
- [strIID_IXPProvider]
- function Shutdown (var lpulFlags : ULONG) : HResult; stdcall;
- function TransportLogon (lpMAPISup : IMAPISupport; ulUIParam : ULONG;
- lpszProfileName : PChar; var lpulFlags : ULONG;
- var lppMAPIError : PMAPIERROR;
- var lppXPLogon : IXPLogon) : HResult; stdcall;
- end;
-
- IXPLogon =
- interface(IUnknown)
- [strIID_IXPLogon]
- function AddressTypes (var lpulFlags : ULONG; var lpcAdrType : ULONG;
- var lpppAdrTypeArray : PChar; var lpcMAPIUID : ULONG;
- var lpppUIDArray : PMAPIUID) : HResult; stdcall;
- function RegisterOptions (var lpulFlags : ULONG; var lpcOptions : ULONG;
- var lppOptions : POPTIONDATA) : HResult; stdcall;
- function TransportNotify (var lpulFlags : ULONG;
- var lppvData : Pointer) : HResult; stdcall;
- function Idle (ulFlags : ULONG) : HResult; stdcall;
- function TransportLogoff (ulFlags : ULONG) : HResult; stdcall;
- function SubmitMessage (ulFlags : ULONG; lpMessage : IMessage;
- var lpulMsgRef : ULONG; var lpulReturnParm : ULONG) : HResult; stdcall;
- function EndMessage (ulMsgRef : ULONG;
- var lpulFlags : ULONG) : HResult; stdcall;
- function Poll (var lpulIncoming : ULONG) : HResult; stdcall;
- function StartMessage (ulFlags : ULONG; lpMessage : IMessage;
- var lpulMsgRef : ULONG) : HResult; stdcall;
- function OpenStatusEntry (lpInterface : PIID; ulFlags : ULONG;
- var lpulObjType : ULONG; var lppEntry : IMAPIStatus) : HResult; stdcall;
- function ValidateState (ulUIParam : ULONG;
- ulFlags : ULONG) : HResult; stdcall;
- function FlushQueues (ulUIParam : ULONG; cbTargetTransport : ULONG;
- lpTargetTransport : PENTRYID; ulFlags : ULONG) : HResult; stdcall;
- end;
-
- { Transport Provider Entry Point }
-
- type
- TXPPROVIDERINIT = function (hInstance : HINST; lpMalloc : IMalloc;
- lpAllocateBuffer : PALLOCATEBUFFER; lpAllocateMore : PALLOCATEMORE;
- lpFreeBuffer : PFREEBUFFER; ulFlags : ULONG; ulMAPIVer : ULONG;
- var lpulProviderVer : ULONG;
- var lppXPProvider : IXPProvider) : HResult; cdecl;
-
- {******************************************************************}
- { }
- { MESSAGE STORE SPI }
- { }
- {******************************************************************}
-
- { Flags and enums }
-
- { For Logon() }
-
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
- {#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h }
- {#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h }
- {#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h }
- {#define MDB_TEMPORARY ((ULONG) 0x00000020) in mapidefs.h }
- {#define MDB_NO_MAIL ((ULONG) 0x00000080) in mapidefs.h }
-
- { For SpoolerLogon() }
-
- {#define MAPI_UNICODE ((ULONG) 0x80000000) in mapidefs.h }
- {#define MDB_NO_DIALOG ((ULONG) 0x00000001) in mapidefs.h }
- {#define MDB_WRITE ((ULONG) 0x00000004) in mapidefs.h }
- {#define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) in mapidefs.h }
-
- { GetCredentials, SetCredentials }
-
- const LOGON_SP_TRANSPORT = ULONG( $00000001);
- const LOGON_SP_PROMPT = ULONG( $00000002);
- const LOGON_SP_NEWPW = ULONG( $00000004);
- const LOGON_CHANGED = ULONG( $00000008);
-
- { DoMCDialog }
-
- const DIALOG_FOLDER = ULONG( $00000001);
- const DIALOG_MESSAGE = ULONG( $00000002);
- const DIALOG_PROP = ULONG( $00000004);
- const DIALOG_ATTACH = ULONG( $00000008);
-
- const DIALOG_MOVE = ULONG( $00000010);
- const DIALOG_COPY = ULONG( $00000020);
- const DIALOG_DELETE = ULONG( $00000040);
-
- const DIALOG_ALLOW_CANCEL = ULONG( $00000080);
- const DIALOG_CONFIRM_CANCEL = ULONG( $00000100);
-
- { ExpandRecips }
-
- const NEEDS_PREPROCESSING = ULONG( $00000001);
- const NEEDS_SPOOLER = ULONG( $00000002);
-
- { PrepareSubmit }
-
- const CHECK_SENDER = ULONG( $00000001);
- const NON_STANDARD = ULONG( $00010000);
-
- { Message Store Provider Interface (IMSPROVIDER) }
-
- type
- IMsLogon = interface;
-
- IMSProvider =
- interface(IUnknown)
- [strIID_IMSProvider]
- function Shutdown (var lpulFlags : ULONG) : HResult; stdcall;
- function Logon (lpMAPISup : IMAPISupport; ulUIParam : ULONG;
- lpszProfileName : PChar; cbEntryID : ULONG; lpEntryID : PENTRYID;
- ulFlags : ULONG; lpInterface : PIID; var lpcbSpoolSecurity : ULONG;
- var lppbSpoolSecurity : PBYTE; var lppMAPIError : PMAPIERROR;
- var lppMSLogon : IMSLogon; var lppMDB : IMsgStore) : HResult; stdcall;
- function SpoolerLogon (lpMAPISup : IMAPISupport; ulUIParam : ULONG;
- lpszProfileName : PChar; cbEntryID : ULONG; lpEntryID : PENTRYID;
- ulFlags : ULONG; lpInterface : PIID; cbSpoolSecurity : ULONG;
- lpbSpoolSecurity : PBYTE; var lppMAPIError : PMAPIERROR;
- var lppMSLogon : IMSLogon; var lppMDB : IMsgStore) : HResult; stdcall;
- function CompareStoreIDs (cbEntryID1 : ULONG; lpEntryID1 : PENTRYID;
- cbEntryID2 : ULONG; lpEntryID2 : PENTRYID; ulFlags : ULONG;
- var lpulResult : ULONG) : HResult; stdcall;
- end;
-
- { The MSLOGON object is returned by the Logon () method of the
- * MSPROVIDER interface. This object is for use by MAPIX.DLL.
- }
-
- IMSLogon =
- interface(IUnknown)
- [strIID_IMSLogon]
- function GetLastError (hResult : HResult; ulFlags : ULONG;
- var lppMAPIError : PMAPIERROR) : HResult; stdcall;
- function Logoff (var lpulFlags : ULONG) : HResult; stdcall;
- function OpenEntry (cbEntryID : ULONG; lpEntryID : PENTRYID;
- lpInterface : PIID; ulFlags : ULONG; var lpulObjType : ULONG;
- var lppUnk : IUnknown) : HResult; stdcall;
- function CompareEntryIDs (cbEntryID1 : ULONG; lpEntryID1 : PENTRYID;
- cbEntryID2 : ULONG; lpEntryID2 : PENTRYID; ulFlags : ULONG;
- var lpulResult : ULONG) : HResult; stdcall;
- function Advise (cbEntryID : ULONG; lpEntryID : PENTRYID;
- ulEventMask : ULONG; lpAdviseSink : IMAPIAdviseSink;
- var lpulConnection : ULONG) : HResult; stdcall;
- function Unadvise (ulConnection : ULONG) : HResult; stdcall;
- function OpenStatusEntry (lpInterface : PIID; ulFlags : ULONG;
- var lpulObjType : ULONG; var lppEntry : Pointer) : HResult; stdcall;
- end;
-
- { Message Store Provider Entry Point }
-
- {!! Note: Message store providers export a function called "MSProviderInit"
- following the syntax of this function declaration }
-
- TMSPROVIDERINIT = function (hInstance : HINST;
- lpMalloc : IMalloc; { AddRef() if you keep it }
- lpAllocateBuffer : PALLOCATEBUFFER; { -> AllocateBuffer }
- lpAllocateMore : PALLOCATEMORE; { -> AllocateMore }
- lpFreeBuffer : PFREEBUFFER; { -> FreeBuffer }
- ulFlags : ULONG; ulMAPIVer : ULONG; var lpulProviderVer : ULONG;
- var lppMSProvider : IMSProvider) : HResult; cdecl;
-
- {******************************************************************}
- { }
- { MESSAGE SERVICE CONFIGURATION }
- { }
- {******************************************************************}
-
- { Flags for service configuration entry point }
-
- { #define MAPI_UNICODE 0x80000000 }
- { #define SERVICE_UI_ALWAYS 0x00000002 }
- { #define SERVICE_UI_ALLOWED 0x00000010 }
- const MSG_SERVICE_UI_READ_ONLY = $00000008 { display parameters only };
- const SERVICE_LOGON_FAILED = $00000020 { reconfigure provider };
-
- { Contexts for service configuration entry point }
-
- const MSG_SERVICE_INSTALL = $00000001;
- const MSG_SERVICE_CREATE = $00000002;
- const MSG_SERVICE_CONFIGURE = $00000003;
- const MSG_SERVICE_DELETE = $00000004;
- const MSG_SERVICE_UNINSTALL = $00000005;
- const MSG_SERVICE_PROVIDER_CREATE = $00000006;
- const MSG_SERVICE_PROVIDER_DELETE = $00000007;
-
- { Prototype for service configuration entry point }
-
- {!! Note: Providers may export a function following the syntax of this function
- declaration }
-
- type
- TMSGSERVICEENTRY = function (hInstance : HINST; lpMalloc : IMalloc;
- lpMAPISup : IMAPISupport; ulUIParam : ULONG; ulFlags : ULONG;
- ulContext : ULONG; cValues : ULONG; lpProps : PSPropValue;
- lpProviderAdmin : IProviderAdmin;
- var lppMapiError : PMAPIERROR) : HResult; stdcall;
-
- PMSGSERVICEENTRY = ^TMSGSERVICEENTRY;
-
- implementation
-
- end.
-
-